<template>
  <div class="not-found">
    <div class="not-found-container">
      <h1 class="status-code">404</h1>
      <h2 class="status-text">页面未找到</h2>
      <p class="description">很抱歉，您访问的页面不存在或已被移除。</p>
      <div class="actions">
        <router-link to="/" class="back-home">返回首页</router-link>
        <button class="back-button" @click="goBack">返回上一页</button>
      </div>
    </div>
  </div>
</template>

<script setup>
import { useRouter } from 'vue-router';

const router = useRouter();

/**
 * 返回上一页
 */
const goBack = () => {
  router.go(-1);
};
</script>

<style scoped>
.not-found {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: calc(100vh - 200px);
  text-align: center;
  padding: 20px;
}

.not-found-container {
  max-width: 500px;
}

.status-code {
  font-size: 100px;
  color: #3498db;
  margin: 0;
  line-height: 1;
}

.status-text {
  font-size: 32px;
  color: #333;
  margin: 0 0 20px;
}

.description {
  font-size: 18px;
  color: #666;
  margin-bottom: 30px;
}

.actions {
  display: flex;
  justify-content: center;
  gap: 20px;
}

.back-home, .back-button {
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: 500;
  text-decoration: none;
}

.back-home {
  background-color: #3498db;
  color: white;
  border: none;
}

.back-home:hover {
  background-color: #2980b9;
}

.back-button {
  background-color: white;
  color: #3498db;
  border: 1px solid #3498db;
}

.back-button:hover {
  background-color: #f0f9ff;
}
</style> 